feat: Add file-based dashboard provisioner#1962
feat: Add file-based dashboard provisioner#1962ZeynelKoca wants to merge 1 commit intohyperdxio:mainfrom
Conversation
🦋 Changeset detectedLatest commit: ffe6158 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@ZeynelKoca is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
PR Review
|
4c24c45 to
abdafb3
Compare
k8s-sidecar watches ConfigMaps labeled "hyperdx.io/dashboard: true" across all namespaces and writes dashboard JSON to a shared volume. HyperDX reads and upserts them natively via file-based provisioner. Requires hyperdxio/hyperdx#1962
bacded7 to
3e9be8a
Compare
|
3e9be8a to
ffe6158
Compare
Summary
Add a file-based dashboard provisioner that watches a directory for
.jsonfiles and upserts dashboards into MongoDB (matched by name for idempotency).Enabled by setting
DASHBOARD_PROVISIONER_DIRto a directory path. Syncs every 30s by default (configurable viaDASHBOARD_PROVISIONER_INTERVALin ms). When the env var is not set, the provisioner is a no-op. This enables GitOps workflows where dashboards are managed as code, similar to Grafana's file-based provisioning (whose implementation heavily inspired this PR).Provisioned dashboards are flagged with
provisioned: trueso they never overwrite user-created dashboards with the same name. Removing a file from the directory does not delete the dashboard (safe by default, same as Grafana).DASHBOARD_PROVISIONER_DIR.jsonfilesDASHBOARD_PROVISIONER_INTERVAL30000DASHBOARD_PROVISIONER_TEAM_IDDASHBOARD_PROVISIONER_ALL_TEAMSfalsetrueto provision to all teams*One of
DASHBOARD_PROVISIONER_TEAM_IDorDASHBOARD_PROVISIONER_ALL_TEAMS=trueis required.How to test locally or on Vercel
References